close all;
wc=2*2*pi;
sim('model2')
figure;
subplot(2,2,1);
plot(state.time, state.signals.values(:,2),'b-');
title('f_{c} = 2 Hz')
ylabel('\theta');
subplot(2,2,3)
plot(derivative.time, derivative.signals.values(:,2),'r-');
ylabel('\dot theta');
%% change frequency low pass filter
wc=20*2*pi;
sim('model2')
subplot(2,2,2);
plot(state.time, state.signals.values(:,2),'b-');
title('f_{c} = 20 Hz')
subplot(2,2,4)
plot(derivative.time, derivative.signals.values(:,2),'r-');

% matlab2tikz('../verslag/img/frequencyFilter.tikz', 'height', '\figureheight', 'width', '\figurewidth' );